import javax.swing.border.CompoundBorder;

public class Doctor extends Adult implements IActivity{
    String specialty;
    double salary;
    String hospitalName;

    public Doctor() {
    }

    public Doctor(String name, String sex, int age, boolean marriage, String address, String specialty, double salary, String hospitalName) {
        super(name, sex, age, marriage, address);
        this.specialty = specialty;
        this.salary = salary;
        this.hospitalName = hospitalName;
    }

    @Override
    public void working() {
        System.out.println(super.name + "正在给病人看病");
    }

    public void show(){
        System.out.println("姓名：" + super.name);
        System.out.println("性别：" + super.sex);
        System.out.println("年龄：" + super.age);
        System.out.println("婚否：" + super.marriage);
        System.out.println("住址：" + super.address);
        System.out.println("专业：" + this.specialty);
        System.out.println("薪水：" + this.salary);
        System.out.println("医院：" + this.hospitalName);
    }
}
